package com.jsnkj.basic.fragment

import androidx.lifecycle.MutableLiveData
import com.jsnkj.basic.bean.UserLoginEntity
import com.jsnkj.basic.http.HttpApiService
import com.jsnkj.basic.mvvm.HttpViewModel
import com.yang.http.HttpRequest

class VideoViewModel : HttpViewModel() {


    var postLoginResult: MutableLiveData<UserLoginEntity> = MutableLiveData()


    /**
     * 获取用户信息
     */
    fun postAuthUserInfo() {
        launchHttp({
            HttpRequest.getService(HttpApiService::class.java).postAuthUserInfo()
        }, onResult = { it ->
            com.jsnkj.basic.util.LogUtils.e("视频页 请求成功：$it")
            postLoginResult.value = it
        }, onFailed = { code, msg ->
            com.jsnkj.basic.util.LogUtils.e("视频页 - onFailed: $code, $msg")
        }) {
            //LogUtils.e("请求成功", "postAppInit onComplete")
        }
    }

}